//
//  ZYOldNetWork.m
//  DesignMode
//
//  Created by wangzhipan on 2024/10/31.
//

#import "ZYOldNetWork.h"

@interface ZYOldNetWork()
@property (nonatomic, assign, readwrite) NetworkState state;
@end

@implementation ZYOldNetWork
- (instancetype)initWithState:(NetworkState)state
{
    if (self = [super init]) {
        self.state = state;
    }
    return self;
}

- (void)operation1
{
    if (self.state == Network_Open){

        //**********
        self.state = Network_Close;
    }
    else if (self.state == Network_Close){

        //..........
        self.state = Network_Connect;
    }
    else if (self.state == Network_Connect){

        //do....
        self.state = Network_Open;
    }
}
- (void)operation2
{
    if (self.state == Network_Open){
        
        //do.....
        self.state = Network_Connect;
    }
    else if (self.state == Network_Close){

        //.....
        self.state = Network_Open;
    }
    else if (self.state == Network_Connect){

        //$$$$$$$$$$
        self.state = Network_Close;
    }
}
- (void)operation3
{
    //do...
}
@end
